From: Florian Müllner Date: Fri, 23 Nov 2018 15:22:45 +0000 (+0100) Subject: calendar: Disconnect signals when resetting notification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~156 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b57832716abb8349569af7606c33c138bc92b2f5;p=gnome-shell.git calendar: Disconnect signals when resetting notification Since commit 5fb8d4f730, a NotificationMessage's notification property is reset to null when the notification is destroyed. However at that point we still have connected signal handlers around that we'll try to disconnect later. Avoid the warnings by disconnecting and resetting the handler IDs at the same time as the notification. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/308 --- diff --git a/js/ui/calendar.js b/js/ui/calendar.js index c4d362537..dfe1bb948 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -779,6 +779,7 @@ var NotificationMessage = new Lang.Class({ this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED); }); this._destroyId = notification.connect('destroy', () => { + this._disconnectNotificationSignals(); this.notification = null; if (!this._closed) this.close(); @@ -808,7 +809,10 @@ var NotificationMessage = new Lang.Class({ _onDestroy() { this.parent(); + this._disconnectNotificationSignals(); + }, + _disconnectNotificationSignals() { if (this._updatedId) this.notification.disconnect(this._updatedId); this._updatedId = 0;